#!/usr/bin/env bash
set -e

# S2I run script for extending the strimzi/kafka-connect image with additional Kafka Connect plugins
# This script is responsible for starting distributed Kafka Connect worker with custom plugins directory

if [ "$1" = "-h" ]
then
  ./usage
  exit 0
fi

export KAFKA_CONNECT_PLUGIN_PATH=/tmp/kafka-plugins
echo "Starting Kafka Connect with custom plugin directory $KAFKA_CONNECT_PLUGIN_PATH"
/opt/kafka/kafka_connect_run.sh